<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <from action="http://www.itcast.com">
<input type="submit" value="提交">
    </from>
    <script>
        const form = document.querySelector('form');
        form.addEventListener('submit', function(event) {

            event.preventDefault(); //阻止默认行为
        })
    </script>


</body>
</html>